package com.cn.wanxi.thread;

public class MyThreadMain {
    public static void main(String[] args) {
        MyThread myThread=new MyThread();//创建线程
        myThread.setPriority(1);
        myThread.setName("线程1");
        myThread.start();//线程就绪,由cpu自动取分配资源
        MyThread myThread1=new MyThread("线程2");//创建线程
        myThread1.start();
        MyThread myThread2=new MyThread("线程3");//创建线程
        myThread2.setPriority(10);
        myThread2.start();
        MyThread myThread3=new MyThread("线程4");//创建线程

        myThread3.start();
    }
}
